﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddStudent.aspx.cs" Inherits="Admin1_Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/admin.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style2
        {
            width: 91px;
            text-align: right;
        }
        .style3
        {
            width: 91px;
            text-align: right;
            height: 46px;
        }
        .style4
        {
            height: 46px;
        }
        .style5
        {
            width: 91px;
            text-align: right;
            height: 41px;
        }
        .style6
        {
            height: 41px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div class="m_box">
        <div class="m_head">
            考生信息</div>
        <div class="m_middle">
            
            <div class="m_m_c">
                <span>查询条件 单位名称</span></div>
            <div class="m_m_c">
                <asp:TextBox ID="TextBox1" runat="server" Width="145px" Height="20px"></asp:TextBox>
                <!--AutoCompleteExtender成員說明
    MinimumPrefixLength：最少輸入幾個字就呼叫Method
    TargetControlID：哪個TextBox要有自動完成功能
    ServiceMethod：呼叫的Method名
    ServicePath：WebService路徑
    CompletionSetCount：要列出幾筆資料
    -->
            </div>
            <div class="m_m_c">
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/image/search.gif" OnClick="ImageButton1_Click" />
            </div>
            请先查询出单位，选择其中一个，再增加考生，可输入如“公安”</div>
        <div style="float: left">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                GridLines="Horizontal" Height="35px" Width="425px" ForeColor="Black" OnPageIndexChanging="GridView1_PageIndexChanging"
                OnRowDeleting="GridView1_RowDeleting" BackColor="White" BorderColor="#CCCCCC"
                BorderStyle="None" BorderWidth="1px" AllowPaging="True" OnRowCancelingEdit="GridView1_RowCancelingEdit"
                OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" DataKeyNames="id"
                ShowHeaderWhenEmpty="True" 
                OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
                <RowStyle HorizontalAlign="Center" />
                <Columns>
                    <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                        SortExpression="id" Visible="False" />
                    <asp:BoundField DataField="danweimingchen" HeaderText="单位名称" 
                        SortExpression="danweimingchen" >
                    <ItemStyle Width="360px" />
                    </asp:BoundField>
                    <asp:CommandField ShowSelectButton="True" />
                </Columns>
                <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                <HeaderStyle BackColor="#3a9cff" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                <RowStyle BackColor="White" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
            </asp:GridView>
        </div>
        <div style=" float: left">
            <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" CellPadding="4"
                GridLines="Horizontal" Height="35px" Width="267px" ForeColor="Black" 
                 BackColor="White" BorderColor="#CCCCCC"
                BorderStyle="None" BorderWidth="1px" AllowPaging="True" 
                  DataKeyNames="id"
                ShowHeaderWhenEmpty="True" 
                >
                <Columns>
                    <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                        ReadOnly="True" SortExpression="ID" Visible="False" />
                    <asp:BoundField DataField="bumenid" HeaderText="bumenid" 
                        SortExpression="bumenid" Visible="False" />
                    <asp:BoundField DataField="danweiid" HeaderText="danweiid" 
                        SortExpression="danweiid" Visible="False" />
                    <asp:BoundField DataField="danweimingchen" HeaderText="danweimingchen" 
                        SortExpression="danweimingchen" Visible="False" />
                    <asp:BoundField DataField="bumenmingcheng" HeaderText="部门名称" 
                        SortExpression="bumenmingcheng" />
                    <asp:BoundField DataField="Name" HeaderText="名字" SortExpression="Name" />
                    <asp:BoundField DataField="kaoshenghao" HeaderText="考生号" 
                        SortExpression="kaoshenghao" />
                </Columns>
            </asp:GridView>
            
            <table style="width: 269px; ">
                <tr>
                    <td class="style3">
                        部门：
                    </td>
                    <td class="style4">
                        <asp:DropDownList ID="DropDownList1" runat="server" Height="36px" Width="148px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style5">
                        姓名：
                    </td>
                    <td class="style6">
                        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="Button1" runat="server" Text="增加" OnClick="Button1_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="t_button">
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                OldValuesParameterFormatString="original_{0}" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
                
                SelectCommand="SELECT a.[ID],a.bumenid,a.danweiid, a.[Name], a.[kaoshenghao], b.danweimingchen, c.bumenmingcheng FROM [Student] a,danwei b,bumeng c where a.danweiid=b.id and a.bumenid=c.id"></asp:SqlDataSource>
            <asp:HiddenField ID="HiddenField1" runat="server" />
            <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/image/allselect.gif"
                OnClick="ImageButton3_Click" />
            <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/image/cselect.gif"
                OnClick="ImageButton2_Click" />
            <asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="~/image/adelete.gif"
                OnClick="ImageButton4_Click" />
        </div>
    </div>
    </form>
</body>
</html>
